<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2021/10/22
 * Time: 16:01
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

namespace app\common\business;


use app\common\validate\TheatreCate as ValObj;
use app\common\model\mysql\TheatreCate as ModelObj;
use think\Exception;
use think\facade\Log;

class TheatreCate extends Base
{
    /**
     * @var ValObj
     */
    protected ValObj $valObj;
    /**
     * @var ModelObj
     */
    protected ModelObj $modelObj;

    /**
     *
     */
    public function __construct()
    {
        $this->valObj = new ValObj();
        $this->modelObj = new ModelObj();
    }

    public function add(array $data = [])
    {

        return parent::add($data); // TODO: Change the autogenerated stub
    }

    public function getTheatreCateByVenueId(int $venue_id = 0, string $filed = '*')
    {
        try {
            $cate = $this->modelObj->getTheatreCateByVenueId($venue_id, $filed);
        } catch (\Exception $e) {
            throw new Exception("查询失败");
        }
        return $cate;
    }
}